import {legacy_createStore, applyMiddleware, combineReducers} from 'redux';
import count_reducer from './reducers/count';
import person_reducer from './reducers/person';
// import {count_reducer} from './reducers';
// 引入中间件，用于解析action中的异步操作（action默认只解析对象，若返回的是函数则需要通过redux-dunk配合解析）
import {thunk} from 'redux-thunk'
// 汇总所有的reducer
const allReducers = combineReducers({sum: count_reducer, personList: person_reducer});
export default legacy_createStore(allReducers, applyMiddleware(thunk));